Several FTBFS fixes for Hurd systems.
authorJordi Mallach <jordi@debian.org>
Thu, 8 Jan 2026 21:38:56 +0000 (22:38 +0100)
committerJordi Mallach <jordi@debian.org>
Thu, 8 Jan 2026 21:38:56 +0000 (22:38 +0100)
Forwarded: no

Gbp-Pq: Name hurd.patch

makefile
scripts/genie.lua
scripts/src/osd/sdl.lua
src/osd/modules/file/posixfile.cpp
src/osd/modules/file/posixptty.cpp
src/osd/sdl/sdlprefix.h

index f7976e809b7b4449486f02102863aa5e6ae21dc6..bbb608359be852e5fa3ffff5f6ffa4c90e8df90f 100644 (file)
--- a/makefile
+++ b/makefile
@@ -229,6 +229,8 @@ GENIEOS := bsd
 else ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
 OS := freebsd
 GENIEOS := freebsd
+else ifeq ($(firstword $(filter GNU,$(UNAME))),GNU)
+OS := gnu
 else ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
 OS := netbsd
 GENIEOS := freebsd
@@ -1296,6 +1298,16 @@ linux: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
        $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
        $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
 
+.PHONY: gnu_x86
+gnu_x86: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32 precompile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32
+
+.PHONY: gnu
+gnu: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
+
 #-------------------------------------------------
 # gmake-linux-clang
 #-------------------------------------------------
index 9cb7ee2a4df13797cdfb3b573e47ff5d440d938b..fa6e98dfcc89727cb75c41b16e8b3118fb0cb356 100644 (file)
@@ -150,6 +150,7 @@ newoption {
                { "netbsd",        "NetBSD"                 },
                { "openbsd",       "OpenBSD"                },
                { "linux",         "Linux"                  },
+               { "gnu",           "GNU"                    },
                { "macosx",        "OSX"                    },
                { "windows",       "Windows"                },
                { "haiku",         "Haiku"                  },
index 86a727213a90fc9edda0ab12912eee6b15b8aad8..d4ae1a2ce841b1d5824ffe3a78acc67ffe3f18d2 100644 (file)
@@ -219,6 +219,9 @@ if _OPTIONS["targetos"]=="windows" then
        SDLOS_TARGETOS      = "win32"
 elseif _OPTIONS["targetos"]=="macosx" then
        SDLOS_TARGETOS      = "macosx"
+elseif _OPTIONS["targetos"]=="gnu" then
+       SDL_NETWORK         = "taptun"
+       SYNC_IMPLEMENTATION = "tc"
 end
 
 if BASE_TARGETOS=="unix" then
index f5dc2e91f10f3c3927682cd3270bf0d4e04cba35..533fa8712044f2d78ed4760e13c95706a5e97ede 100644 (file)
 #define _DARWIN_C_SOURCE
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
+
 // MAME headers
 #include "posixfile.h"
 #include "osdcore.h"
index fa120454706437ce5518bc2a2c3fff3901d4d8cb..3299eb4d2480e6d0d08e7359c73fb1d6108c6598 100644 (file)
@@ -27,6 +27,9 @@
 #include <util.h>
 #elif defined(__linux__) || defined(__EMSCRIPTEN__)
 #include <pty.h>
+#elif defined(__GNU__)
+#include <pty.h>
+#include <termios.h>
 #elif defined(__HAIKU__)
 #include <bsd/pty.h>
 #elif defined(__sun)
 #include <sys/conf.h>
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
 
 namespace {
 
index 0678b3ddba5c11db1b30e874acd7e0af8e027717..5303c867b799f2a6c5589d1733bac3f8417bd87c 100644 (file)
@@ -40,7 +40,7 @@
 /* Large file support on IRIX needs _SGI_SOURCE */
 #undef _POSIX_SOURCE
 
-#elif defined(__linux__) || defined(__FreeBSD_kernel__)
+#elif defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__)
 #define SDLMAME_LINUX 1
 
 #elif defined(__FreeBSD__)